@charset "utf-8";
@import "./conf";
@import "./mixins/clearfix";
@import "./mixins/ellipsis";

.bk-tab2 {
    border: 1px solid $borderColor;
    border-radius: 2px;
    background: #fff;
    .bk-panel-label {
        display: inline-block;
        vertical-align: middle;
        margin-right: 3px;
    }
    .bk-panel-title {
        vertical-align: middle;
    }
    .bk-tab2-control {
        display: inline-block;
        height: 58px;
        line-height: 58px;
        width: 30px;
        position: relative;
        cursor: pointer;
        &.left {
            float: left;
            border-right: 1px solid #c3cdd7;
            border-bottom: 1px solid #c3cdd7;
        }
        &.right {
            float: right;
            border-left: 1px solid #c3cdd7;
            border-bottom: 1px solid #c3cdd7;
        }
        &.left,
        &.right {
            &.disabled {
                color: #ebf0f5;
                cursor: not-allowed;
            }
        }
        .bk-tab2-icon {
            position: absolute;
            transform: translate(-50%, -50%);
            top: 50%;
            left: 50%;
            font-size: 18px;
        }
    }
    .bk-tab2-head {
        position: relative;
        // border-bottom: 1px solid $borderColor;
        height: 58px;

        overflow: hidden;
        white-space: nowrap;

        &.scroll {
            margin: 0 30px;
            .bk-tab2-nav {
                > .tab2-nav-item {
                    &.active {
                        &:last-child {
                            border-right: none;
                        }
                    }
                }
            }
        }

        @include clearfix;
        &.is-fill {
            background: #fafbfd;
            .bk-tab2-nav {
                > .tab2-nav-item {
                    border-left: 1px solid transparent;
                    border-right: 1px solid transparent;
                    &.active {
                        &:first-child {
                            border-left-color: transparent;
                        }
                        background: #fff;
                        border-color: $borderColor;

                        // border-left: 1px solid #fff;
                        border-right: 1px solid $borderColor;
                        &::after {
                            bottom: -1px;
                            left: 0;
                            height: 1px;
                            background: #fff;
                        }
                    }
                }
            }
        }
        .bk-tab2-nav {
            float: left;
            list-style: none;
            margin: 0;
            padding: 0;
            border-bottom: 1px solid $borderColor;
            height: 100%;
            transition: transform .5s ease-in-out;
            @include clearfix;
            > .tab2-nav-item {
                @include ellipsis(180px);
                // width: 180px;
                text-align: center;
                position: relative;
                // float: left;
                height: 58px;
                line-height: 58px;
                padding: 0 20px;
                color: $fnMainColor;
                font-size: 14px;
                cursor: pointer;
                transition: background-color ease 0.3s, color ease 0.3s;
                &::after {
                    content:'';
                    display:inline-block;
                    position: absolute;
                    bottom: -1px;
                    left: 0;
                    width: 100%;
                    opacity: 0;
                    height: 0;
                    background: $primaryColor;
                    transition: all 0.3s ease;
                }
                &.active {
                    color: $primaryColor;
                    &::after {
                      opacity: 1;
                      height: 3px;
                    }
                }
            }
            .tab2-nav-item-tag {
                position: relative;
                top: -2px;
            }
        }
        .bk-tab2-act,
        .bk-tab2-action {
            height: 100%;
            display: table;
            position: absolute;
            right: 20px;
            .action-wrapper {
                display: table-cell;
                vertical-align: middle;
            }
        }
    }

    &.bk-tab2-small {
        .bk-tab2-control {
            height: 43px;
            line-height: 43px;
        }
        .bk-tab2-head {
            height: 43px;
            .bk-tab2-nav {
                > .tab2-nav-item {
                    height: 43px;
                    line-height: 43px;
                    padding: 0 15px;
                }
            }
        }
    }

    .bk-tab2-content {
        .bk-tab2-pane {
            display: none;
            opacity: 0;
            &.active {
                opacity: 1;
                display: block;
            }
        }
    }
}
